<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/resources/scaffold/pageTemplate.xhtml">


	<ui:param name="pageTitle" value="Logowanie do systemu"/>

	<ui:define name="header">
		Logowanie do systemu
	</ui:define>

	<ui:define name="subheader">
		Wprowadź dane
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="login" rendered="#{not identity.loggedIn}">
	<h:messages />
			<f:validateBean disabled="true">
				<h:panelGroup styleClass="search">

					<h:panelGrid columnClasses="label,component,required" columns="3">
						<h:outputLabel for="usersBeanExampleUsername" value="Login(e-mail):"/>
						<h:panelGroup>
							<h:inputText id="usersBeanExampleUsername" value="#{credentials.username}"/>
							<h:message for="usersBeanExampleUsername" styleClass="error"/>
						</h:panelGroup>
						<h:outputText/>
						<h:outputLabel for="usersBeanExamplePassword" value="Hasło:"/>
						<h:panelGroup>
							<h:inputText id="usersBeanExamplePassword" value="#{credentials.password}"/>
							<h:message for="usersBeanExamplePassword" styleClass="error"/>
						</h:panelGroup>
						<h:outputText/>
					</h:panelGrid>
					<h:panelGroup styleClass="buttons">
						<h:commandLink value="Zaloguj" action="#{identity.login()}" styleClass="btn btn-info"/>
						<h:panelGroup>
							<h:outputText value="Nie masz konta ? " /><h:link outcome="/register" value="Zarejestruj się"/> 
						</h:panelGroup>
					</h:panelGroup>
				</h:panelGroup>
			</f:validateBean>
		</h:form>
	</ui:define>

</ui:composition>
